<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:sec="http://www.springframework.org/security/facelets/tags">
    <h:head>
        <title>Principal</title>
    </h:head>
    <h:body>
        <h1>Gerenciador Financeiro Pessoal</h1>
        
        Usuário logado #{request.remoteUser}
        <br />
        <h:form>
            <sec:ifAnyGranted roles="ROLE_ADMINISTRADOR">
                <h:commandLink action="/admin/principal" title="Administrativo">
                    <h:graphicImage library="imagens" name="administrativo16.png" />
                </h:commandLink>
            </sec:ifAnyGranted>
            
            <a onclick="document.location='#{request.contextPath}/j_spring_security_logout'" title="Sair">
                <h:graphicImage library="imagens" name="logout16.png" />
            </a>
        </h:form>
    </h:body>
</html>
